
cmake_minimum_required(VERSION 3.5)

project(learn_muduo VERSION 0.1 LANGUAGES CXX)

set(CMAKE_INCLUDE_CURRENT_DIR ON)
set(CMAKE_CXX_STANDARD 11)
set(CMAKE_CXX_STANDARD_REQUIRED ON)

set (COMPILE_CONTROL OFF)

set(CXX_FLAGS
 -g
 # -DVALGRIND
 -DCHECK_PTHREAD_RETURN_VALUE
 -D_FILE_OFFSET_BITS=64
 -Wall
 -Wextra
 -Werror
 -Wconversion
 -Wno-unused-parameter
 -Wold-style-cast
 -Woverloaded-virtual
 -Wpointer-arith
 -Wshadow
 -Wwrite-strings
 -march=native
 # -MMD
 -std=c++11
 -rdynamic
 )

include_directories(include)
include_directories(.)
link_directories(lib)
add_subdirectory(examples)

# 定义源文件，在src目录下所有.cpp和.h文件
# file(GLOB_RECURSE SOURCES src/*.cc src/*.h)
# set(PROJECT_SOURCES ${SOURCES})
# add_executable(jh_tof_camera ${PROJECT_SOURCES})
# target_link_libraries(jh_tof_camera PRIVATE Qt${QT_VERSION_MAJOR}::Widgets)
